﻿/**********************************************************************
 * @file   OperSpectra.h
 * @brief  频谱操作器 - 创建频谱
 * @author XingXuanCi (xingxuanci@diso.cn)
 * @date   2024-11-25
 *********************************************************************/
#ifndef _OperatorsSEASubSystem_H
#define _OperatorsSEASubSystem_H

#include "FITK_Kernel/FITKCore/FITKActionOperator.h"
#include "FITK_Kernel/FITKCore/FITKOperatorRepo.h"


namespace Acoustics
{
    class FITKAbstractSEASubSys;
}

namespace GUIOper
{
    /**
     * @brief 频谱操作器创建操作器
     * @author XingXuanCi (xingxuanci@diso.cn)
     * @date   2024-11-25
     */
    class OperSpectra :public Core::FITKActionOperator
    {
        Q_OBJECT;
    public:
        /**
         * @brief Construct a new Operators Create SubSystem object
         * @author XingXuanCi (xingxuanci@diso.cn)
         * @date   2024-11-25
         */
        explicit OperSpectra() = default;
        /**
         * @brief Destroy the Operators Create SubSystem object
         * @author XingXuanCi (xingxuanci@diso.cn)
         * @date   2024-11-25
         */
        virtual ~OperSpectra() = default;
        /**
         * @brief 执行
         * @return true 成功
         * @return false 失败
         * @author XingXuanCi (xingxuanci@diso.cn)
         * @date   2024-11-25
         */
        virtual bool execGUI() override;
        /**
         * @brief 执行结果处理
         * @return true 成功
         * @return false 失败
         * @author XingXuanCi (xingxuanci@diso.cn)
         * @date   2024-11-25
         */
        virtual bool execProfession() override;

    protected:
        /**
         * @brief    创建频谱操作器
         * @param[i] actionName 动作名称
         * @author   XingXuanCi (xingxuanci@diso.cn)
         * @date     2024-11-25
         */
        void createSpectraOper(QString actionName);

    };    

    // 按钮注册相关操作
    Register2FITKOperatorRepo(actionDampingLossFactor, OperSpectra);
    Register2FITKOperatorRepo(actionAbsorptionCoefficient, OperSpectra);
    Register2FITKOperatorRepo(actionModalDensity, OperSpectra);
    Register2FITKOperatorRepo(actionWavenumber, OperSpectra);
    Register2FITKOperatorRepo(actionCouplingLossFactor, OperSpectra);
    Register2FITKOperatorRepo(actionTransmissionLoss, OperSpectra);
    Register2FITKOperatorRepo(actionInsertionLoss, OperSpectra);
    Register2FITKOperatorRepo(actionShearModulus, OperSpectra);
}

#endif
